package com.fish.start.animation.threads;

import android.os.Message;

import com.fish.start.animation.StartAnimationActivity;

public class AnimationDealyThread implements Runnable{
	private static final int mSpan = 100;
	private StartAnimationActivity mStartAnimationActivity;
	public AnimationDealyThread(StartAnimationActivity aStartAnimationActivity){
		mStartAnimationActivity = aStartAnimationActivity;
	}
	@Override
	public void run() {
		while(mStartAnimationActivity.mAnimationDelay<=0){
			mStartAnimationActivity.mAnimationDelay-=mSpan;
			try {
				Thread.sleep(mSpan);
			} catch (InterruptedException e) {
				e.printStackTrace();
			}
		}
		Message msg = new Message();
		msg.what = mStartAnimationActivity.ANIMATION_SATART_0;
		mStartAnimationActivity.mHahdler.sendMessage(msg);
	}
}
